package com.xiangxiangjd.kj.papersstar.bean;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author jinbin
 * @date 2018-07-08 20:43
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("u_user")//@TableName中的值对应着表名
public class User {//个人用户



    @TableId(value = "id",type = IdType.ID_WORKER_STR)
    String id;


    @ApiModelProperty(value = "用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty(value = "密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "电话")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "token")
    @TableField("token")
    private String token;



    //自动新增时间
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private String createTime;
    //自动更新时间

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private String updateTime;


    //自动默认值0
    @TableField(value = "del_flag",fill = FieldFill.INSERT)
    private String delFlag;


    @TableField("status")
    private Integer status;

    public interface Status {
        int DISABLED = 0;
        int VALID = 1;
        int LOCKED = 2;
    }

    @ApiModelProperty(value = "是否第一次登录0是1否")
    @TableField("first_login")
    private Integer firstLogin;//是否第一次登录 0是第一次 1不是第一次登录

    //获取用户回答文件的答案
    @TableField(exist = false)
    List<UserAnswer> userAnswers;
}
